package com.clothing.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * @ClassName: ArticlePraise 
 * @Description: TODO(文章赞) 
 * @author Charles 
 * @date 2018年6月8日 下午2:16:46 
 * @version 1.0
 */
@Entity
@Table(name = "article_praise")
public class ArticlePraise extends BaseEntity
{
    /** 
     * @Fields serialVersionUID : TODO(用一句话描述这个变量表示什么) 
     */ 
    private static final long serialVersionUID = -3738748262045959155L;

    private Article article;
    
    private User user;
    
    private Boolean praise;

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "article", nullable = false)
    public Article getArticle()
    {
        return article;
    }

    public void setArticle(Article article)
    {
        this.article = article;
    }

    @ManyToOne(fetch = FetchType.LAZY)
    @JoinColumn(name = "user", nullable = false)
    public User getUser()
    {
        return user;
    }

    public void setUser(User user)
    {
        this.user = user;
    }

    @Column(name = "praise", nullable = false)
    public Boolean getPraise()
    {
        return praise;
    }

    public void setPraise(Boolean praise)
    {
        this.praise = praise;
    }
}
